package com.ss.android.article.base.feature.f.a;

import android.content.Context;
import android.view.ViewGroup;

import com.bytedance.common.utility.UIUtils;
import com.ss.android.article.base.feature.f.b.b;
import com.ss.android.article.base.feature.f.c.d;

public abstract class f extends com.ss.android.m.a.a {
    public com.ss.android.article.base.feature.f.c.a h;
    public  com.ss.android.article.base.feature.f.b.b i;

    public f(Context arg2) {
        this.i = (b) this.j;
        new d();
        this.h = this.a(arg2, this.i);
    }

    public abstract com.ss.android.article.base.feature.f.c.a a(Context arg1, b arg2);

    public void a(int arg3, int arg4) {
        this.e();
        com.ss.android.article.base.feature.f.c.a v1 = this.h;
        if (arg3 != 0 && arg4 != 0) {
            ViewGroup.LayoutParams v0 = v1.i.getLayoutParams() != null ? v1.i.getLayoutParams() : new ViewGroup.LayoutParams(arg3, arg4);
            v0.width = arg3;
            v0.height = arg4;
            v1.i.setLayoutParams(v0);
        }

        UIUtils.setVisibility(this.h.c(), 0);
    }

    public void a(int arg1, Exception arg2) {
        super.a(arg1, arg2);
    }

    public void g() {
        super.g();
        com.ss.android.article.base.feature.f.c.a v0 = this.h;
        v0.e = null;
        v0.f = false;
        v0.g = null;
        v0.h = null;
    }

    public final boolean m() {
        boolean v0 = true;
        if (this.h != null) {
            Context v1 = this.h.d();
            if (v1 != null && !android.support.design.a.t(v1)) {
                v0 = false;
            }
        }

        return v0;
    }

    protected final Context n() {
        Context v0 = this.h == null ? null : this.h.d();
        return v0;
    }
}

